import React,{ Component,memo } from 'react'
import styles from '../../../styles/Home/Search.module.scss'
import Sanjiao from '../../../image/sanjiao.png'
// import '../../../../../App.scss'
import Dizhi from "../window/dizhi"
import { Link } from "react-router-dom";



class Search extends Component{

  state = {
    show: false
  }

  handleClick = (params) => {
    this.setState({
      show: !this.state.show,
    })
  }

  render(){
  return (
    <div className={styles.Search}>
       <div className={styles.area} onClick={this.handleClick}>
            <span className={styles.yu}>海南</span>
            <img src={Sanjiao} className={styles.sanjiao} alt=""/>
       </div>
       {/* { this.state.show && ReactDom.createPortal(<h1>123</h1>,this.el) } */}
       <Dizhi show={this.state.show}></Dizhi>
       <div className={styles.shu}></div>
       <Link to="/search">
          <input type="text" placeholder='请输入你想住的地点' className={styles.SearchContent}/>
       </Link>
    </div>
   )
  }
}

export default memo(Search)


